UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pngGZ6vXWleU0AYUNEov9NHCNxaMvlNAX6B1bUA/C1g='
WHERE
key_id = 'd724853c0d171c1f8201d1fe90245e9dbbf82a37cc84881f4ccc2b9d286fba77'
AND (
token = 'pngGZ6vXWleU0AYUNEov9NHCNxaMvlNAX6B1bUA/C1g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)