UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PA/WEQK+yv9QdjDrAl30oXAL3y2B/g96KZ9YYueYR48='
WHERE
key_id = 'a156abb2f140f00f1e06d3d9e7a763932fe66a762ef5444bc5dacb8d6023b88f'
AND (
token = 'PA/WEQK+yv9QdjDrAl30oXAL3y2B/g96KZ9YYueYR48='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)