UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EGoAb01pr21veW18v5OKxiRnKsJGhY/ZT0UFlZlb9CU='
WHERE
key_id = '62be9e711e231af7ca948521b426038d82f9780f07b8516a9bca4da4e078dd7b'
AND (
token = 'EGoAb01pr21veW18v5OKxiRnKsJGhY/ZT0UFlZlb9CU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)