UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Bj/Z51dspm0MTfUXqiq7pWUCCHAF1aj3Wr/WuD4Tic='
WHERE
key_id = '55f597d8bd7353c580b31620a4420ca9a73f296e231cf2b37479afc5148f0e6c'
AND (
token = '1Bj/Z51dspm0MTfUXqiq7pWUCCHAF1aj3Wr/WuD4Tic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)