UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DUZd6Vd3l7gKkefmSCEz8N52ite0SnP4haF1RSLK3N8='
WHERE
key_id = '68019669356d9b49754d25ed6d05a290cf9c0fc4964e187992472e5a46e8871f'
AND (
token = 'DUZd6Vd3l7gKkefmSCEz8N52ite0SnP4haF1RSLK3N8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)