UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CXKOrj3Z/A5RxwO2H7zbShRei9rtwJtq3XpPFBR0hvw='
WHERE
key_id = '64ad10e6ac46405fd02d559607bca21482e29ad3542d067dce90348916deda56'
AND (
token = 'CXKOrj3Z/A5RxwO2H7zbShRei9rtwJtq3XpPFBR0hvw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)