UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZH4g4ECzQUCy0yDDTwrNkkQznBB/+hG6P6TY7WHTyFg='
WHERE
key_id = 'a69b6e083043249371d0faf9e68fb5a160a5246de01a341cccaf6e9adcbcf0b7'
AND (
token = 'ZH4g4ECzQUCy0yDDTwrNkkQznBB/+hG6P6TY7WHTyFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)