UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LYpVcszn+m1etxJ0XkxwNAXpFTrb4Iuxm2Hr//WKvXs='
WHERE
key_id = '609baa50f857373d022118743b616b04c02f380868ca22ac8490041617724990'
AND (
token = 'LYpVcszn+m1etxJ0XkxwNAXpFTrb4Iuxm2Hr//WKvXs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)