UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2m2clPuE2/5IeUxb82DvYRcNNzaG8Nj2KyoAfvNT7z0='
WHERE
key_id = 'fc79dc6e35e2d54590a6775b82f63f838033269efb915ea28b069b8688f3ff54'
AND (
token = '2m2clPuE2/5IeUxb82DvYRcNNzaG8Nj2KyoAfvNT7z0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)