UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j24h2VSVLZhWMOBzkjR2BMdJ3lTLHYTzMQRLbHlHDPc='
WHERE
key_id = '2bb7067b0f47b0669b61c382a07fb615feb03a86335f8547b574f1b5ba894930'
AND (
token = 'j24h2VSVLZhWMOBzkjR2BMdJ3lTLHYTzMQRLbHlHDPc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)