UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'P9Idmcd9/L9bEaybRRu7U4u+OYCHqR7ZLb0iVtLSdKQ='
WHERE
key_id = '13141ce13aa5c8333391e69760a3f4c9233d7656a9e2665b3cad3d6858ff0dbc'
AND (
token = 'P9Idmcd9/L9bEaybRRu7U4u+OYCHqR7ZLb0iVtLSdKQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)