UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LB/GiY3VPTgc5IFFz4N2N9E6PzKHJPXYXFrmGcm3E9o='
WHERE
key_id = 'c5ba3ce69228de99644ecacc45b9f15f25e910b59cb11eb6a6b4f6bdadd27aa0'
AND (
token = 'LB/GiY3VPTgc5IFFz4N2N9E6PzKHJPXYXFrmGcm3E9o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)