UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dXfuYFfxl3og/xkl57XR3Fc6MCuSTN5qvIfQrWK0Pds='
WHERE
key_id = '4d2681ba75baa99ffef6e5a1558515be7963a4c373a66221645d6b881619c6f0'
AND (
token = 'dXfuYFfxl3og/xkl57XR3Fc6MCuSTN5qvIfQrWK0Pds='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)