UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hw//hFB6O+3Wx1VGV9tqWDAp5KiyuQrg2bydiHxjOSo='
WHERE
key_id = 'c56c6f03f21ccc0f700fe72b9d21d4cf7bd2d0a7b1417ffb84225f224038b0ac'
AND (
token = 'Hw//hFB6O+3Wx1VGV9tqWDAp5KiyuQrg2bydiHxjOSo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)