UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jrBziI0Enw857sJ7rhoFGatZ//RqCNkrzzbmYGXshoY='
WHERE
key_id = '7115f2132b6fe5932eb0e71ebb98df20f1e014f1c54568c7f38f8f2a5480a516'
AND (
token = 'jrBziI0Enw857sJ7rhoFGatZ//RqCNkrzzbmYGXshoY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)