UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FwIjxTp8xQ+LGeUVs5AZKoEBM72aV+iGKBEhGia9NBM='
WHERE
key_id = '1f448eccf2f66c52e6f919bd6ac224ba517bae2604c5176f408ea4fcdc3d6aa8'
AND (
token = 'FwIjxTp8xQ+LGeUVs5AZKoEBM72aV+iGKBEhGia9NBM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)