UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V1A5LRR7yBb9JQorKAPFOAxsz5GEABpGlKjU/Qe7q48='
WHERE
key_id = '4d09bc689cb91b825d8461531cb7f7fb7156d0578c1a11dd791472cdde94440d'
AND (
token = 'V1A5LRR7yBb9JQorKAPFOAxsz5GEABpGlKjU/Qe7q48='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)