UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OE8mM6TemBY7o4hZZU8Bk89zyHtEIQWbcT3vT1FUVsk='
WHERE
key_id = '10448cea210a7afd78649970bd26b85219450d96eacab59a511ee758f0155c32'
AND (
token = 'OE8mM6TemBY7o4hZZU8Bk89zyHtEIQWbcT3vT1FUVsk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)