UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dkmsrj/l/9lbgxs7K1QcBQ6fWzC+rQTnS6na2fXijoc='
WHERE
key_id = '124ce011f2fa7407845b277189787bcd0443958401a376bb29746be838b89e77'
AND (
token = 'Dkmsrj/l/9lbgxs7K1QcBQ6fWzC+rQTnS6na2fXijoc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)