UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fRpcVGq97E7ZihqoMQFjQm/sNs8uskmVLMYtlmQ1Y90='
WHERE
key_id = '2a3d101dcfa4c986b7538fb63db689b84123909f1961dec5c2f355319f599099'
AND (
token = 'fRpcVGq97E7ZihqoMQFjQm/sNs8uskmVLMYtlmQ1Y90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)