UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o73LBIwOAAoLmvS//DIFv9hAfECDBjOK0AXjprFrQUk='
WHERE
key_id = '2aae7bc41fc1b4315aee8c3886dbb651e9fd2ac9dfd5402e0443dc62dda726bf'
AND (
token = 'o73LBIwOAAoLmvS//DIFv9hAfECDBjOK0AXjprFrQUk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)