UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8v/X1Hsi10zEC3XurulvhBnBCIotB3zxewdxW06aHhA='
WHERE
key_id = 'b4b75f5f29599ec4d2ca0f52cad51caf346c9718da4220248b4b9bd71b31f46b'
AND (
token = '8v/X1Hsi10zEC3XurulvhBnBCIotB3zxewdxW06aHhA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)