UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MUtkKq7iMN6PnMvCQFZYyfGhv/vaM9cDRzyh/NWSH8U='
WHERE
key_id = '17bbf765dfb7a6fb57ac58b9ef7f84c7f0337a786a829e20094e3d50539622d6'
AND (
token = 'MUtkKq7iMN6PnMvCQFZYyfGhv/vaM9cDRzyh/NWSH8U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)