UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xiogwGMnv8QqEqW//qpRh2aQap+3YhE9D21Hm9c2/Ag='
WHERE
key_id = 'ef85a612f8018fcb3dd499a064f23ff63b793669018d8e3cce274d7985457424'
AND (
token = 'xiogwGMnv8QqEqW//qpRh2aQap+3YhE9D21Hm9c2/Ag='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)