UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q6c7X6D/0/zfF2LqyPVde2jDlGDfzOVcW268oECSoHM='
WHERE
key_id = '6243483a6e1ad0b0104a089ea66f1124132f7d3e2d8888605c548d1e0bd12804'
AND (
token = 'q6c7X6D/0/zfF2LqyPVde2jDlGDfzOVcW268oECSoHM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)