UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F+VW0bgf/yDPkVB1D8UaPNW8KGiXeC6EAXpHfOhh1hM='
WHERE
key_id = '732ab6b6d7d11eafa696931d18c89a847b18532641fca2742d5503d85612ef44'
AND (
token = 'F+VW0bgf/yDPkVB1D8UaPNW8KGiXeC6EAXpHfOhh1hM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)