UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wxmBKrRmBy1gqd2DZqyuee7ehOhuJg2P+xC1ICHr+Ps='
WHERE
key_id = '3528024907a62adc5fc9b9f192f695db0141ea65f389da8695bc50dee97f3649'
AND (
token = 'wxmBKrRmBy1gqd2DZqyuee7ehOhuJg2P+xC1ICHr+Ps='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)