UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uLnjB7kWM+ERNDa6rMIQk+LJdKvv4sZMJLvM13nCq/Y='
WHERE
key_id = '5886636718de4936395dace0f80303f385b360395ad9c96c2a0fb7f05e68d520'
AND (
token = 'uLnjB7kWM+ERNDa6rMIQk+LJdKvv4sZMJLvM13nCq/Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)