UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mns0YrdgcwfdUzkXVC9pLNv3GyHuUTrdgW1ccwnbmUE='
WHERE
key_id = '0d1ddc548376c2995a00d824f57a530d1e0cb6835593913c1dc625912714b891'
AND (
token = 'Mns0YrdgcwfdUzkXVC9pLNv3GyHuUTrdgW1ccwnbmUE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)