UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0ol/BbDgrCOGtx4/KmmmmCuhne51PusXdWcdQs1ZZNU='
WHERE
key_id = '3abf4038e4eb8a27be743b96c65fe6bbda32bba63e2a3f7f3c9700ea47491179'
AND (
token = '0ol/BbDgrCOGtx4/KmmmmCuhne51PusXdWcdQs1ZZNU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)