UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7n2Y7UC/NN6mFuIuVToU6Jfc0Qair2odZ+OsWszgf7Q='
WHERE
key_id = 'f53d3a7e30bc89e72234aed883d4b7ed304f413adaefc44a5dbc3591a3b0f19c'
AND (
token = '7n2Y7UC/NN6mFuIuVToU6Jfc0Qair2odZ+OsWszgf7Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)