UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ThOK1SXV/S0lGXKNEb4JbAYZb/dkJ+vv7Om+vhjIWVg='
WHERE
key_id = '113609a5aa02f9f849623c13a6a9aefab1d6e60705b7a9bd13bd4b85d0394bc6'
AND (
token = 'ThOK1SXV/S0lGXKNEb4JbAYZb/dkJ+vv7Om+vhjIWVg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)