UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GLjQdK4MuJpsRDUvkYpLdXmeDHH21vXuea/SUOkUahA='
WHERE
key_id = 'efbc620b50662a7320fc5d911008c7c1526d7bded1a788bd49aa7cd4575ab626'
AND (
token = 'GLjQdK4MuJpsRDUvkYpLdXmeDHH21vXuea/SUOkUahA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)