UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V30wsRd1z539bfej/EZ4T+jSgtYvZno/AcooKaxR8M0='
WHERE
key_id = '89e52579b07afd73c6332274d9c86b3f457627c3d9307aedbf491ea7353894a1'
AND (
token = 'V30wsRd1z539bfej/EZ4T+jSgtYvZno/AcooKaxR8M0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)